﻿CodeMirror.runMode=function(h,i,c,j){i=CodeMirror.getMode(CodeMirror.defaults,i);if(1==c.nodeType){var l=j&&j.tabSize||CodeMirror.defaults.tabSize,k=c,d=0;k.innerHTML="";c=function(a,c){if("\n"==a)k.appendChild(document.createElement("br")),d=0;else{for(var e="",b=0;;){var g=a.indexOf("\t",b);if(-1==g){e+=a.slice(b);d+=a.length-b;break}else{d+=g-b;e+=a.slice(b,g);b=l-d%l;d+=b;for(var f=0;f<b;++f)e+=" ";b=g+1}}c?(g=k.appendChild(document.createElement("span")),g.className="cm-"+c.replace(/ +/g," cm-"),
g.appendChild(document.createTextNode(e))):k.appendChild(document.createTextNode(e))}}}for(var h=CodeMirror.splitLines(h),j=CodeMirror.startState(i),f=0,m=h.length;f<m;++f){f&&c("\n");for(var a=new CodeMirror.StringStream(h[f]);!a.eol();){var n=i.token(a,j);c(a.current(),n,f,a.start);a.start=a.pos}}};